from compare_graphs import compare_two_graphs, print_comparison_results

# 使用示例
if __name__ == '__main__':
    # 示例路径
    current_graph = 'call_graph.json'
    gold_graph = 'call_graph_ECL_mini_test.json'

    try:
        # 比较两个图并打印结果
        results = compare_two_graphs(gold_graph, current_graph)
        score = results['overall']
        print(f'总体适配进度: {score:.1f}%')
        print_comparison_results(results)

    except Exception as e:
        print(f'比较图时出错: {str(e)}')
